"""Base model with common fields."""
from datetime import datetime
from app import db


class BaseModel(db.Model):
    """Abstract base model with common fields."""
    
    __abstract__ = True
    
    id = db.Column(db.String(36), primary_key=True)
    created_at = db.Column(db.DateTime, default=datetime.utcnow, nullable=False)
    updated_at = db.Column(db.DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, nullable=False)
